.class public Lcom/zuiapps/common/feedback/ConversationActivity;
.super Landroid/app/Activity;
.source "ConversationActivity.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;
    }
.end annotation


# instance fields
.field private adapter:Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;

.field private agent:Lcom/umeng/fb/FeedbackAgent;

.field private contactEntryView:Landroid/widget/TextView;

.field private defaultConversation:Lcom/umeng/fb/model/Conversation;

.field private header:Landroid/widget/RelativeLayout;

.field private headerHeight:I

.field private replyListView:Landroid/widget/ListView;

.field private sendButton:Landroid/widget/Button;

.field private userReplyContentEdit:Landroid/widget/EditText;


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 32
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 224
    return-void
.end method

.method static synthetic access$000(Lcom/zuiapps/common/feedback/ConversationActivity;)Landroid/widget/EditText;
    .registers 2
    .param p0, "x0"    # Lcom/zuiapps/common/feedback/ConversationActivity;

    .prologue
    .line 32
    iget-object v0, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->userReplyContentEdit:Landroid/widget/EditText;

    return-object v0
.end method

.method static synthetic access$100(Lcom/zuiapps/common/feedback/ConversationActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/zuiapps/common/feedback/ConversationActivity;

    .prologue
    .line 32
    invoke-direct {p0}, Lcom/zuiapps/common/feedback/ConversationActivity;->back()V

    return-void
.end method

.method static synthetic access$200(Lcom/zuiapps/common/feedback/ConversationActivity;)Lcom/umeng/fb/model/Conversation;
    .registers 2
    .param p0, "x0"    # Lcom/zuiapps/common/feedback/ConversationActivity;

    .prologue
    .line 32
    iget-object v0, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->defaultConversation:Lcom/umeng/fb/model/Conversation;

    return-object v0
.end method

.method static synthetic access$300(Lcom/zuiapps/common/feedback/ConversationActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/zuiapps/common/feedback/ConversationActivity;

    .prologue
    .line 32
    invoke-direct {p0}, Lcom/zuiapps/common/feedback/ConversationActivity;->sync()V

    return-void
.end method

.method static synthetic access$400(Lcom/zuiapps/common/feedback/ConversationActivity;)Landroid/widget/Button;
    .registers 2
    .param p0, "x0"    # Lcom/zuiapps/common/feedback/ConversationActivity;

    .prologue
    .line 32
    iget-object v0, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->sendButton:Landroid/widget/Button;

    return-object v0
.end method

.method static synthetic access$500(Lcom/zuiapps/common/feedback/ConversationActivity;)Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;
    .registers 2
    .param p0, "x0"    # Lcom/zuiapps/common/feedback/ConversationActivity;

    .prologue
    .line 32
    iget-object v0, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->adapter:Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;

    return-object v0
.end method

.method private back()V
    .registers 5

    .prologue
    .line 204
    :try_start_0
    const-string v2, "input_method"

    invoke-virtual {p0, v2}, Lcom/zuiapps/common/feedback/ConversationActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Landroid/view/inputmethod/InputMethodManager;

    .line 205
    .local v1, "imm":Landroid/view/inputmethod/InputMethodManager;
    invoke-virtual {p0}, Lcom/zuiapps/common/feedback/ConversationActivity;->getWindow()Landroid/view/Window;

    move-result-object v2

    invoke-virtual {v2}, Landroid/view/Window;->getDecorView()Landroid/view/View;

    move-result-object v2

    invoke-virtual {v2}, Landroid/view/View;->getWindowToken()Landroid/os/IBinder;

    move-result-object v2

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/view/inputmethod/InputMethodManager;->hideSoftInputFromWindow(Landroid/os/IBinder;I)Z
    :try_end_18
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_18} :catch_28

    .line 210
    .end local v1    # "imm":Landroid/view/inputmethod/InputMethodManager;
    :goto_18
    invoke-virtual {p0}, Lcom/zuiapps/common/feedback/ConversationActivity;->finish()V

    .line 213
    sget v2, Landroid/os/Build$VERSION;->SDK_INT:I

    const/4 v3, 0x4

    if-le v2, v3, :cond_27

    .line 214
    sget v2, Lcom/zuiapps/common/feedback/R$anim;->umeng_fb_finish_activity_in:I

    sget v3, Lcom/zuiapps/common/feedback/R$anim;->umeng_fb_finish_activity_out:I

    invoke-virtual {p0, v2, v3}, Lcom/zuiapps/common/feedback/ConversationActivity;->overridePendingTransition(II)V

    .line 216
    :cond_27
    return-void

    .line 206
    :catch_28
    move-exception v0

    .line 207
    .local v0, "e":Ljava/lang/Exception;
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_18
.end method

.method private measureView(Landroid/view/View;)V
    .registers 9
    .param p1, "child"    # Landroid/view/View;

    .prologue
    const/4 v6, 0x0

    .line 161
    invoke-virtual {p1}, Landroid/view/View;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v3

    .line 162
    .local v3, "p":Landroid/view/ViewGroup$LayoutParams;
    if-nez v3, :cond_e

    .line 163
    new-instance v3, Landroid/view/ViewGroup$LayoutParams;

    .end local v3    # "p":Landroid/view/ViewGroup$LayoutParams;
    const/4 v4, -0x1

    const/4 v5, -0x2

    invoke-direct {v3, v4, v5}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V

    .line 166
    .restart local v3    # "p":Landroid/view/ViewGroup$LayoutParams;
    :cond_e
    iget v4, v3, Landroid/view/ViewGroup$LayoutParams;->width:I

    invoke-static {v6, v6, v4}, Landroid/view/ViewGroup;->getChildMeasureSpec(III)I

    move-result v1

    .line 167
    .local v1, "childWidthSpec":I
    iget v2, v3, Landroid/view/ViewGroup$LayoutParams;->height:I

    .line 169
    .local v2, "lpHeight":I
    if-lez v2, :cond_22

    .line 170
    const/high16 v4, 0x40000000

    invoke-static {v2, v4}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v0

    .line 174
    .local v0, "childHeightSpec":I
    :goto_1e
    invoke-virtual {p1, v1, v0}, Landroid/view/View;->measure(II)V

    .line 175
    return-void

    .line 172
    .end local v0    # "childHeightSpec":I
    :cond_22
    invoke-static {v6, v6}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v0

    .restart local v0    # "childHeightSpec":I
    goto :goto_1e
.end method

.method private setListViewHeader()V
    .registers 7

    .prologue
    .line 149
    const-string v1, "layout_inflater"

    invoke-virtual {p0, v1}, Lcom/zuiapps/common/feedback/ConversationActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/LayoutInflater;

    .line 150
    .local v0, "inflater":Landroid/view/LayoutInflater;
    sget v1, Lcom/zuiapps/common/feedback/R$layout;->umeng_fb_list_header:I

    iget-object v2, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->replyListView:Landroid/widget/ListView;

    const/4 v3, 0x0

    invoke-virtual {v0, v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/RelativeLayout;

    iput-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->header:Landroid/widget/RelativeLayout;

    .line 152
    iget-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->replyListView:Landroid/widget/ListView;

    iget-object v2, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->header:Landroid/widget/RelativeLayout;

    invoke-virtual {v1, v2}, Landroid/widget/ListView;->addHeaderView(Landroid/view/View;)V

    .line 153
    iget-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->header:Landroid/widget/RelativeLayout;

    invoke-direct {p0, v1}, Lcom/zuiapps/common/feedback/ConversationActivity;->measureView(Landroid/view/View;)V

    .line 154
    iget-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->header:Landroid/widget/RelativeLayout;

    invoke-virtual {v1}, Landroid/widget/RelativeLayout;->getMeasuredHeight()I

    move-result v1

    iput v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->headerHeight:I

    .line 156
    iget-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->header:Landroid/widget/RelativeLayout;

    iget-object v2, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->header:Landroid/widget/RelativeLayout;

    invoke-virtual {v2}, Landroid/widget/RelativeLayout;->getPaddingLeft()I

    move-result v2

    iget v3, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->headerHeight:I

    neg-int v3, v3

    iget-object v4, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->header:Landroid/widget/RelativeLayout;

    invoke-virtual {v4}, Landroid/widget/RelativeLayout;->getPaddingRight()I

    move-result v4

    iget-object v5, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->header:Landroid/widget/RelativeLayout;

    invoke-virtual {v5}, Landroid/widget/RelativeLayout;->getPaddingBottom()I

    move-result v5

    invoke-virtual {v1, v2, v3, v4, v5}, Landroid/widget/RelativeLayout;->setPadding(IIII)V

    .line 157
    iget-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->header:Landroid/widget/RelativeLayout;

    const/16 v2, 0x8

    invoke-virtual {v1, v2}, Landroid/widget/RelativeLayout;->setVisibility(I)V

    .line 158
    return-void
.end method

.method private sync()V
    .registers 3

    .prologue
    .line 188
    new-instance v0, Lcom/zuiapps/common/feedback/ConversationActivity$5;

    invoke-direct {v0, p0}, Lcom/zuiapps/common/feedback/ConversationActivity$5;-><init>(Lcom/zuiapps/common/feedback/ConversationActivity;)V

    .line 199
    .local v0, "listener":Lcom/umeng/fb/model/Conversation$SyncListener;
    iget-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->defaultConversation:Lcom/umeng/fb/model/Conversation;

    invoke-virtual {v1, v0}, Lcom/umeng/fb/model/Conversation;->sync(Lcom/umeng/fb/model/Conversation$SyncListener;)V

    .line 200
    return-void
.end method


# virtual methods
.method public onBackPressed()V
    .registers 1

    .prologue
    .line 220
    invoke-super {p0}, Landroid/app/Activity;->onBackPressed()V

    .line 221
    invoke-direct {p0}, Lcom/zuiapps/common/feedback/ConversationActivity;->back()V

    .line 222
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .registers 5
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 46
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 47
    const/4 v1, 0x1

    invoke-virtual {p0, v1}, Lcom/zuiapps/common/feedback/ConversationActivity;->requestWindowFeature(I)Z

    .line 48
    sget v1, Lcom/zuiapps/common/feedback/R$layout;->umeng_fb_activity_conversation:I

    invoke-virtual {p0, v1}, Lcom/zuiapps/common/feedback/ConversationActivity;->setContentView(I)V

    .line 50
    :try_start_c
    new-instance v1, Lcom/umeng/fb/FeedbackAgent;

    invoke-direct {v1, p0}, Lcom/umeng/fb/FeedbackAgent;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->agent:Lcom/umeng/fb/FeedbackAgent;

    .line 51
    iget-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->agent:Lcom/umeng/fb/FeedbackAgent;

    invoke-virtual {v1}, Lcom/umeng/fb/FeedbackAgent;->getDefaultConversation()Lcom/umeng/fb/model/Conversation;

    move-result-object v1

    iput-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->defaultConversation:Lcom/umeng/fb/model/Conversation;

    .line 53
    sget v1, Lcom/zuiapps/common/feedback/R$id;->umeng_fb_reply_list:I

    invoke-virtual {p0, v1}, Lcom/zuiapps/common/feedback/ConversationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ListView;

    iput-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->replyListView:Landroid/widget/ListView;

    .line 54
    iget-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->replyListView:Landroid/widget/ListView;

    const/4 v2, 0x2

    invoke-virtual {v1, v2}, Landroid/widget/ListView;->setOverScrollMode(I)V

    .line 55
    invoke-direct {p0}, Lcom/zuiapps/common/feedback/ConversationActivity;->setListViewHeader()V

    .line 57
    new-instance v1, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;

    invoke-direct {v1, p0, p0}, Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;-><init>(Lcom/zuiapps/common/feedback/ConversationActivity;Landroid/content/Context;)V

    iput-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->adapter:Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;

    .line 58
    iget-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->replyListView:Landroid/widget/ListView;

    iget-object v2, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->adapter:Lcom/zuiapps/common/feedback/ConversationActivity$ReplyListAdapter;

    invoke-virtual {v1, v2}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 61
    invoke-direct {p0}, Lcom/zuiapps/common/feedback/ConversationActivity;->sync()V

    .line 64
    sget v1, Lcom/zuiapps/common/feedback/R$id;->umeng_fb_contact_text:I

    invoke-virtual {p0, v1}, Lcom/zuiapps/common/feedback/ConversationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->contactEntryView:Landroid/widget/TextView;

    .line 66
    iget-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->contactEntryView:Landroid/widget/TextView;

    new-instance v2, Lcom/zuiapps/common/feedback/ConversationActivity$1;

    invoke-direct {v2, p0}, Lcom/zuiapps/common/feedback/ConversationActivity$1;-><init>(Lcom/zuiapps/common/feedback/ConversationActivity;)V

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 84
    sget v1, Lcom/zuiapps/common/feedback/R$id;->umeng_fb_back:I

    invoke-virtual {p0, v1}, Lcom/zuiapps/common/feedback/ConversationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    new-instance v2, Lcom/zuiapps/common/feedback/ConversationActivity$2;

    invoke-direct {v2, p0}, Lcom/zuiapps/common/feedback/ConversationActivity$2;-><init>(Lcom/zuiapps/common/feedback/ConversationActivity;)V

    invoke-virtual {v1, v2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 92
    sget v1, Lcom/zuiapps/common/feedback/R$id;->umeng_fb_send:I

    invoke-virtual {p0, v1}, Lcom/zuiapps/common/feedback/ConversationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    iput-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->sendButton:Landroid/widget/Button;

    .line 93
    iget-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->sendButton:Landroid/widget/Button;

    new-instance v2, Lcom/zuiapps/common/feedback/ConversationActivity$3;

    invoke-direct {v2, p0}, Lcom/zuiapps/common/feedback/ConversationActivity$3;-><init>(Lcom/zuiapps/common/feedback/ConversationActivity;)V

    invoke-virtual {v1, v2}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 116
    sget v1, Lcom/zuiapps/common/feedback/R$id;->umeng_fb_reply_content:I

    invoke-virtual {p0, v1}, Lcom/zuiapps/common/feedback/ConversationActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/EditText;

    iput-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->userReplyContentEdit:Landroid/widget/EditText;

    .line 117
    iget-object v1, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->userReplyContentEdit:Landroid/widget/EditText;

    new-instance v2, Lcom/zuiapps/common/feedback/ConversationActivity$4;

    invoke-direct {v2, p0}, Lcom/zuiapps/common/feedback/ConversationActivity$4;-><init>(Lcom/zuiapps/common/feedback/ConversationActivity;)V

    invoke-virtual {v1, v2}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V
    :try_end_89
    .catch Ljava/lang/Exception; {:try_start_c .. :try_end_89} :catch_8a

    .line 146
    :goto_89
    return-void

    .line 142
    :catch_8a
    move-exception v0

    .line 143
    .local v0, "e":Ljava/lang/Exception;
    invoke-virtual {p0}, Lcom/zuiapps/common/feedback/ConversationActivity;->finish()V

    goto :goto_89
.end method

.method protected onResume()V
    .registers 5

    .prologue
    .line 179
    invoke-super {p0}, Landroid/app/Activity;->onResume()V

    .line 180
    iget-object v0, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->agent:Lcom/umeng/fb/FeedbackAgent;

    invoke-virtual {v0}, Lcom/umeng/fb/FeedbackAgent;->getUserInfoLastUpdateAt()J

    move-result-wide v0

    const-wide/16 v2, 0x0

    cmp-long v0, v0, v2

    if-lez v0, :cond_17

    .line 181
    iget-object v0, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->contactEntryView:Landroid/widget/TextView;

    sget v1, Lcom/zuiapps/common/feedback/R$string;->umeng_fb_modify_contact_info:I

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    .line 185
    :goto_16
    return-void

    .line 183
    :cond_17
    iget-object v0, p0, Lcom/zuiapps/common/feedback/ConversationActivity;->contactEntryView:Landroid/widget/TextView;

    sget v1, Lcom/zuiapps/common/feedback/R$string;->umeng_fb_contact_info:I

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(I)V

    goto :goto_16
.end method
